/**
 * 
 */
package ro.dta.idbi.model;

import java.util.Hashtable;
import java.util.regex.Matcher;

import ro.dta.idbi.interfaces.IPrimitiveParser;

/**
 * Foreign key parser for the rename BAV transformation
 * 
 * @author Tudor Dobrila
 *
 */
public class RenameFkParser implements IPrimitiveParser {

	@Override
	public Hashtable<String, Object> parse(Matcher matcher) {
		Hashtable<String, Object> result = new Hashtable<String, Object>();
		result.put("type", "foreignkey");
		result.put("old", matcher.group(1));
		result.put("new", matcher.group(14));
		return result;
	}
	
}
